<template>
	<view>
		<u-tabs inactive-color="#000" :list="tabs" :is-scroll="false" v-model="curTab" :active-color="appTheme.mainBg"
			:duration="0.2" @change="onChangeTab" />
<!-- 		<div class="tips">
			<u-icon name="volume-up" style="margin-right: 10rpx;"></u-icon>
			各大合作平台，下单越多，奖励越多
		</div> -->
		<div class="box" v-if="list.length">
			<div class="box-item" v-for="(item,index) in list" :key="index">
				<div class="left">
					<image :src="item.img" mode=""></image>
				</div>
				<div class="right">
					<div class="title">
						<text class="ic">分销</text>
						<text>{{item.name}}</text>
					</div>
					<div class="price-box">
					<!-- 	<div class="lf">
							订单金额 ￥{{item.price}}
						</div>
						<div class="rh">
							奖励金额 ￥{{item.jlPrice}}
						</div> -->
					</div>
					<div class="btom">
						<div class="lf">￥{{item.price}}</div>
						<div class="fr">购买</div>
					</div>
				</div>
			</div>
		</div>
		<div v-else style="padding-top: 100rpx;">
			<u-empty margin-top="50rpx" mode="list"></u-empty>
		</div>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabs: [{
						name: `精选肉类`,
						value: 'all'
					},
					{
						name: `休闲零食`,
						value: 'a1'
					},
					{
						name: `坚果炒货`,
						value: 'a2'
					},
					{
						name: `茶叶冲调`,
						value: 'a4'
					},
					{
						name: `膨化食品`,
						value: 'a3'
					},
				],
				curTab: 'all',
				list: [{
					img: 'https://b2c.oozetking.cn/uploads/10001/20240726/3dc00e2495700408f95facf78a2ccc49.png',
					name: '洁柔乌龙抽纸2包100抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加',
					price: '145',
					jlPrice: '112',
					time: '2024.05.18 14:26',
					from: '来自新疆乌鲁木齐的用户',
					pt: '抖音'
				},{
					img: 'https://b2c.oozetking.cn/uploads/10001/20240726/3dc00e2495700408f95facf78a2ccc49.png',
					name: '洁柔乌龙抽纸2包100抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加',
					price: '145',
					jlPrice: '112',
					time: '2024.05.18 14:26',
					from: '来自新疆乌鲁木齐的用户',
					pt: '抖音'
				},{
					img: 'https://b2c.oozetking.cn/uploads/10001/20240726/3dc00e2495700408f95facf78a2ccc49.png',
					name: '洁柔乌龙抽纸2包100抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加',
					price: '145',
					jlPrice: '112',
					time: '2024.05.18 14:26',
					from: '来自新疆乌鲁木齐的用户',
					pt: '抖音'
				},{
					img: 'https://b2c.oozetking.cn/uploads/10001/20240726/3dc00e2495700408f95facf78a2ccc49.png',
					name: '洁柔乌龙抽纸2包100抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加抽无印花抽纸母婴加',
					price: '145',
					jlPrice: '112',
					time: '2024.05.18 14:26',
					from: '来自新疆乌鲁木齐的用户',
					pt: '抖音'
				},]
			};
		},
		methods: {
			onChangeTab() {

			}
		},
		onPullDownRefresh() {
			uni.stopPullDownRefresh()
		}
	}
</script>

<style lang="scss">
	.tips {
		width: 750rpx;
		height: 72rpx;
		background: #FF8C19;
		color: #fff;
		line-height: 72rpx;
		padding-left: 28rpx;
		box-sizing: border-box;
	}

	.box {
		background-color: #fff;

		.box-item {
			padding: 24rpx;
			display: flex;

			.left {
				width: 200rpx;
				height: 200rpx;
				background: #EEEEEE;
				border-radius: 16rpx;
				overflow: hidden;
				margin-right: 24rpx;
				position: relative;

				>image {
					width: 100%;
					height: 100%;
				}

				.modal {
					position: absolute;
					bottom: 0;
					left: 0;
					width: 200rpx;
					height: 46rpx;
					background: #000000;
					border-radius: 0rpx 0rpx 12rpx 12rpx;
					opacity: 0.4;
					display: flex;
					align-items: center;
					justify-content: center;
					color: #fff;
				}

			}

			.right {
				flex: 1;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				.title {
					width: 478rpx;
					margin-bottom: 20rpx;
					height: 68rpx;
					text-overflow: ellipsis;
					overflow: hidden;
					white-space: nowrap;
					.ic {
						float: left;
						width: 96rpx;
						height: 28rpx;
						margin-right: 4rpx;
						background: #FFC225;
						border-radius: 4rpx;
						display: flex;
						align-items: center;
						justify-content: center;
						color: #fff;
						font-weight: 500;
						font-size: 20rpx;
					}
				}

				.price-box {
					display: flex;
					align-items: center;
					margin-bottom: 22rpx;
					>.lf {
						font-weight: 400;
						font-size: 24rpx;
						color: #444444;
						width: 180rpx;
						height: 48rpx;
						line-height: 48rpx;
						text-align: center;
						background: #F5F4F2;
						border-radius: 200rpx 0rpx 0rpx 200rpx;
					}

					>.rh {
						font-weight: 400;
						font-size: 24rpx;
						color: #fff;
						width: 180rpx;
						line-height: 48rpx;
						text-align: center;
						height: 48rpx;
						background: linear-gradient( 135deg, #FD3052 0%, #FD3041 100%);
						border-radius: 0rpx 200rpx 200rpx 0rpx;
					}
				}

				.btom {
					display: flex;
					align-items: center;
					justify-content: space-between;
					>.lf{
						font-size: 36rpx;
						font-weight: bold;
					}
					>.fr{
						color: #FF8C19;
						width: 180rpx;
						border: 2rpx solid #FF8C19 ;
						height: 50rpx;
						border-radius: 25rpx;
						display: flex;
						align-items: center;
						justify-content: center;
					}
				}
			}
		}
	}
</style>	